package com.yunlinker.asba.utils;

import android.view.Gravity;
import android.widget.Toast;

import com.yunlinker.asba.MainApplication;


/**
 * Created by Administrator on 2016/10/8.
 */
public class ToastUtil {


    public static void show(String str){
        Toast.makeText(MainApplication.getInstance(), str, Toast.LENGTH_SHORT).show();
    }

    public static void showTop(String str){
        Toast toast = Toast.makeText(MainApplication.getInstance(), str,
                Toast.LENGTH_SHORT);
        //可以控制toast显示的位置
        toast.setGravity(Gravity.CENTER_VERTICAL|Gravity.CENTER_HORIZONTAL, 0, 0);
        toast.show();
    }

}
